import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class ObjectInputStreamDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("MyFile\\src\\tmp\\oos.txt"));
        Object stu = ois.readObject();
        stu_oos stud = (stu_oos)stu;
        System.out.println(stud.getName() + " " +  stud.getAge());
    }
}
